<%@ page language="java" pageEncoding="UTF-8"
	errorPage="../../defaultException.jsp"%>
<%@include file="../../tags.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>更新新闻信息</title>
<%@include file="../../head.jsp"%>
</head>
<body>
	<form id="fm" method="post" enctype="multipart/form-data">

		<table class="fitem">
			<tr>
				<td><label>新闻中文标题:</label></td>
				<td><input class="easyui-validatebox" name="zhname"
					value="${news.zhname }"
					data-options="required:true,validType:'length[0,64]'" /></td>
			</tr>
			<tr>
				<td><label>新闻英文标题:</label></td>
				<td><input class="easyui-validatebox" name="enname"
					value="${news.enname }" data-options="validType:'length[0,64]'" />
				</td>
			</tr>
			<tr>
				<td><label>新闻来源:</label></td>
				<td><input name="newsSource" value="${news.newsSource }"
					class="easyui-validatebox"
					data-options="required:true,validType:'length[0,64]'"></td>
			</tr>
			<tr>
				<td><label>编辑:</label></td>
				<td><input name="editor" value="${news.editor }"
					class="easyui-validatebox"
					data-options="required:true,validType:'length[0,16]'"></td>
			</tr>
			<tr>
				<td><label>新闻类别:</label></td>
				<td><input name="featureCategoryId" id="newsType"
					required="true"></td>
			</tr>
			<tr>
				<td><label>归属的国家:</label>
				</td>
				<td><input id="countryId" name="countryId" required="true" /></td>
			</tr>
			<tr>
				<td><label>新图片:</label></td>
				<td><input name="imagepart" type="file" size="53"
					class="easyui-validatebox"></td>
			</tr>
			<tr>
				<td><label>新闻摘要:</label></td>
				<td><textarea name="summary" id="newsSummary"
						data-options="required:true,validType:'length[0,64]'"
						class="easyui-validatebox" style="width: 392px; height: 80px"
						required="true">${news.summary }</textarea></td>
			</tr>
			<tr>
				<td><label>新闻内容:</label></td>
				<td><textarea name="content" id="newsContent"
						data-options="required:true,validType:'length[0,2048]'"
						class="easyui-validatebox" style="width: 392px; height: 80px"
						required="true">${news.content }</textarea></td>
			</tr>
			<tr>
				<td><label>旧图片:</label>
				</td>
				<td><img src="${image_domain}${news.source}" width=200px
					height=160px> <input type="hidden" value="${news.source }"
					name="source"> <input type="hidden" value="${news.infoId }"
					name="infoId"> <input type="hidden" value="${news.dataId }"
					name="dataId"> <input type="hidden"
					value="${news.imageId }" name="imageId"> <input
					type="hidden" value="${news.infoType }" name="infoType"></td>
			</tr>
			<input type="hidden" value="${news.newsId }" name="newsId">
		</table>
	</form>

	<script>
		//初始新闻类别列表
		$('#newsType').combobox({
			url : '${cpath }/admin/news/type/list',
			valueField : 'featureCategoryId',
			textField : 'featureCategoryName',
			editable : false,
			value : '${news.featureCategoryId}'
		});
		$('#newsContent').ceditor();
		$('#newsSummary').ceditor();
		//初始化国家列表
		$('#countryId').combobox({
			url : '${cpath }/admin/dest/listCountry',
			valueField : 'countryId',
			textField : 'countryName',
			editable : false,
			value : '${news.countryId}'
		});
	</script>
	<style type="text/css">
#fm {
	margin: 0;
	padding: 40px 40px;
}

.ftitle {
	font-size: 14px;
	font-weight: bold;
	padding: 5px 0;
	margin-bottom: 10px;
	border-bottom: 1px solid #ccc;
}

.fitem {
	margin-bottom: 5px;
}

.fitem label {
	display: inline-block;
	width: 90px;
}
</style>
</body>
</html>